askrene: deprecate auto.no_mpp_support layer, use maxparts=1 instead#8998
Open
ThomsenDrake wants to merge 1 commit intoElementsProject:masterfrom
Open
askrene: deprecate auto.no_mpp_support layer, use maxparts=1 instead#8998ThomsenDrake wants to merge 1 commit intoElementsProject:masterfrom
ThomsenDrake wants to merge 1 commit intoElementsProject:masterfrom
Conversation
The auto.no_mpp_support layer was used to force single-path payments for destinations that don't support MPP. Since maxparts=1 already switches to the single-path algorithm, the layer is redundant. Changes: - askrene: remove remove_small_channel_layer() and auto.no_mpp_support handling from layer validation, creation, and algorithm override - xpay: when disable_mpp is set, send maxparts=1 to getroutes instead of adding the auto.no_mpp_support layer - tests: update test_getroutes_single_path, test_excessive_fee_cost, and test_impossible_payment to use maxparts=1 instead of the layer - docs: update getroutes.json to describe three automatic layers and point to maxparts=1 for single-path payments Fixes ElementsProject#8871
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
auto.no_mpp_supportlayer was used to force single-path payments for destinations that don't support MPP. Sincemaxparts=1already switches to the single-path algorithm (line ~616 in askrene.c), the layer is redundant.Changes
plugins/askrene/askrene.c (net -44 lines):
remove_small_channel_layer()function entirelyauto.no_mpp_supportfrom layer name validationauto.no_mpp_supportbranch from layer creation/handlingplugins/xpay/xpay.c (+3/-2):
disable_mppis set (invoice doesn't offer OPT_BASIC_MPP), sendmaxparts=1to getroutes instead of adding theauto.no_mpp_supportlayertests/test_askrene.py (6 test calls updated):
layers=["auto.no_mpp_support"]withmaxparts=1intest_getroutes_single_path,test_excessive_fee_cost, andtest_impossible_paymentmaxpartsparameter support tocheck_getroute_paths()helperdoc/schemas/getroutes.json:
maxparts=1should be used for single-path payments instead of a layerFixes #8871